

<!doctype html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>skidl.schematics.route module &#8212; SKiDL 2.2.0 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
    <link rel="stylesheet" type="text/css" href="../_static/bizstyle.css?v=a66e137f" />
    
    <script src="../_static/documentation_options.js?v=b21de401"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../_static/bizstyle.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!--[if lt IE 9]>
    <script src="_static/css3-mediaqueries.js"></script>
    <![endif]-->
  </head><body>
    <h1 id="site-title"><a href="../../../"><img src="../../../images/slim_banner.png" width="100%"></a></h1>
    
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SKiDL 2.2.0 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">skidl.schematics.route module</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-skidl.schematics.route">
<span id="skidl-schematics-route-module"></span><h1>skidl.schematics.route module<a class="headerlink" href="#module-skidl.schematics.route" title="Link to this heading">¶</a></h1>
<p>Autorouter for generating wiring between symbols in a schematic.</p>
<dl class="py exception">
<dt class="sig sig-object py" id="skidl.schematics.route.GlobalRoutingFailure">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.schematics.route.</span></span><span class="sig-name descname"><span class="pre">GlobalRoutingFailure</span></span><a class="reference internal" href="../_modules/skidl/schematics/route.html#GlobalRoutingFailure"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.GlobalRoutingFailure" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skidl.schematics.route.RoutingFailure" title="skidl.schematics.route.RoutingFailure"><code class="xref py py-class docutils literal notranslate"><span class="pre">RoutingFailure</span></code></a></p>
<p>Failure during global routing phase.</p>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="skidl.schematics.route.Router">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.schematics.route.</span></span><span class="sig-name descname"><span class="pre">Router</span></span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3.13/library/functions.html#object" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Mixin to add routing function to Node class.</p>
<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.add_junctions">
<span class="sig-name descname"><span class="pre">add_junctions</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.add_junctions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.add_junctions" title="Link to this definition">¶</a></dt>
<dd><p>Add X &amp; T-junctions where wire segments in the same net meet.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.add_routing_points">
<span class="sig-name descname"><span class="pre">add_routing_points</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.add_routing_points"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.add_routing_points" title="Link to this definition">¶</a></dt>
<dd><p>Add routing points by extending wires from pins out to the edge of the part bounding box.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>nets</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)"><em>list</em></a>) – List of nets to be routed.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.cleanup_wires">
<span class="sig-name descname"><span class="pre">cleanup_wires</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.cleanup_wires"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.cleanup_wires" title="Link to this definition">¶</a></dt>
<dd><p>Try to make wire segments look prettier.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.create_routing_tracks">
<span class="sig-name descname"><span class="pre">create_routing_tracks</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">routing_bbox</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.create_routing_tracks"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.create_routing_tracks" title="Link to this definition">¶</a></dt>
<dd><p>Create horizontal &amp; vertical global routing tracks.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.create_switchboxes">
<span class="sig-name descname"><span class="pre">create_switchboxes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">h_tracks</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v_tracks</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.create_switchboxes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.create_switchboxes" title="Link to this definition">¶</a></dt>
<dd><p>Create routing switchboxes from the faces in the horz/vert tracks.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>h_tracks</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)"><em>list</em></a>) – List of horizontal Tracks.</p></li>
<li><p><strong>v_tracks</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)"><em>list</em></a>) – List of vertical Tracks.</p></li>
<li><p><strong>options</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a><em>, </em><em>optional</em>) – Dictionary of options and values.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of Switchboxes.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)">list</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.create_terminals">
<span class="sig-name descname"><span class="pre">create_terminals</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">internal_nets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">h_tracks</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v_tracks</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.create_terminals"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.create_terminals" title="Link to this definition">¶</a></dt>
<dd><p>Create terminals on the faces in the routing tracks.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.global_router">
<span class="sig-name descname"><span class="pre">global_router</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.global_router"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.global_router" title="Link to this definition">¶</a></dt>
<dd><p>Globally route a list of nets from face to face.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>nets</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)"><em>list</em></a>) – List of Nets to be routed.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of GlobalRoutes.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>List</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.rmv_routing_stuff">
<span class="sig-name descname"><span class="pre">rmv_routing_stuff</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.rmv_routing_stuff"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.rmv_routing_stuff" title="Link to this definition">¶</a></dt>
<dd><p>Remove attributes added to parts/pins during routing.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.route">
<span class="sig-name descname"><span class="pre">route</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tool</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.route"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.route" title="Link to this definition">¶</a></dt>
<dd><p>Route the wires between part pins in this node and its children.</p>
<dl class="simple">
<dt>Steps:</dt><dd><ol class="arabic simple">
<li><p>Divide the bounding box surrounding the parts into switchboxes.</p></li>
<li><p>Do global routing of nets through sequences of switchboxes.</p></li>
<li><p>Do detailed routing within each switchbox.</p></li>
</ol>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>node</strong> (<a class="reference internal" href="skidl.node.html#skidl.node.Node" title="skidl.node.Node"><em>Node</em></a>) – Hierarchical node containing the parts to be connected.</p></li>
<li><p><strong>tool</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#str" title="(in Python v3.13)"><em>str</em></a>) – Backend tool for schematics.</p></li>
<li><p><strong>options</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a><em>, </em><em>optional</em>) – Dictionary of options and values:
“allow_routing_failure”, “draw”, “draw_all_terminals”, “show_capacities”,
“draw_switchbox”, “draw_routing”, “draw_channels”</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="skidl.schematics.route.Router.switchbox_router">
<span class="sig-name descname"><span class="pre">switchbox_router</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">switchboxes</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/skidl/schematics/route.html#Router.switchbox_router"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.Router.switchbox_router" title="Link to this definition">¶</a></dt>
<dd><p>Create detailed wiring between the terminals along the sides of each switchbox.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>switchboxes</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#list" title="(in Python v3.13)"><em>list</em></a>) – List of SwitchBox objects to be individually routed.</p></li>
<li><p><strong>options</strong> (<a class="reference external" href="https://docs.python.org/3.13/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a><em>, </em><em>optional</em>) – Dictionary of options and values.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="skidl.schematics.route.RoutingFailure">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.schematics.route.</span></span><span class="sig-name descname"><span class="pre">RoutingFailure</span></span><a class="reference internal" href="../_modules/skidl/schematics/route.html#RoutingFailure"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.RoutingFailure" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3.13/library/exceptions.html#Exception" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></a></p>
<p>Exception raised when a net connecting pins cannot be routed.</p>
</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="skidl.schematics.route.SwitchboxRoutingFailure">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">skidl.schematics.route.</span></span><span class="sig-name descname"><span class="pre">SwitchboxRoutingFailure</span></span><a class="reference internal" href="../_modules/skidl/schematics/route.html#SwitchboxRoutingFailure"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#skidl.schematics.route.SwitchboxRoutingFailure" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skidl.schematics.route.RoutingFailure" title="skidl.schematics.route.RoutingFailure"><code class="xref py py-class docutils literal notranslate"><span class="pre">RoutingFailure</span></code></a></p>
<p>Failure during switchbox routing phase.</p>
</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3><a href="../index.html">Table of Contents</a></h3>
    <ul>
<li><a class="reference internal" href="#">skidl.schematics.route module</a><ul>
<li><a class="reference internal" href="#skidl.schematics.route.GlobalRoutingFailure"><code class="docutils literal notranslate"><span class="pre">GlobalRoutingFailure</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router"><code class="docutils literal notranslate"><span class="pre">Router</span></code></a><ul>
<li><a class="reference internal" href="#skidl.schematics.route.Router.add_junctions"><code class="docutils literal notranslate"><span class="pre">Router.add_junctions()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.add_routing_points"><code class="docutils literal notranslate"><span class="pre">Router.add_routing_points()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.cleanup_wires"><code class="docutils literal notranslate"><span class="pre">Router.cleanup_wires()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.create_routing_tracks"><code class="docutils literal notranslate"><span class="pre">Router.create_routing_tracks()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.create_switchboxes"><code class="docutils literal notranslate"><span class="pre">Router.create_switchboxes()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.create_terminals"><code class="docutils literal notranslate"><span class="pre">Router.create_terminals()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.global_router"><code class="docutils literal notranslate"><span class="pre">Router.global_router()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.rmv_routing_stuff"><code class="docutils literal notranslate"><span class="pre">Router.rmv_routing_stuff()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.route"><code class="docutils literal notranslate"><span class="pre">Router.route()</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.Router.switchbox_router"><code class="docutils literal notranslate"><span class="pre">Router.switchbox_router()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#skidl.schematics.route.RoutingFailure"><code class="docutils literal notranslate"><span class="pre">RoutingFailure</span></code></a></li>
<li><a class="reference internal" href="#skidl.schematics.route.SwitchboxRoutingFailure"><code class="docutils literal notranslate"><span class="pre">SwitchboxRoutingFailure</span></code></a></li>
</ul>
</li>
</ul>

  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/rst_output/skidl.schematics.route.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">SKiDL 2.2.0 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">skidl.schematics.route module</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
    &#169; Copyright 2016-2025, Dave Vandenbout.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
    </div>
  </body>
</html>